package com.rjs.serialization.constant;

public enum SerializeType {

	DefaultJavaSerializer("DefaultJavaSerializer"),
	HessianSerializer("HessianSerializer"),
	JSONSerializer("JSONSerializer"),
	ProtoStuffSerializer("ProtoStuffSerializer"),
	XmlSerializer("XmlSerializer"),
	MarshallingSerializer("MarshallingSerializer"),
	;
	
	private String serializeType;

	public String getSerializeType() {
		return serializeType;
	}

	private SerializeType(String serializeType) {
		this.serializeType = serializeType;
	}

	public static SerializeType queryByType(String type) {
		SerializeType ret = null;
		for (SerializeType serializeType : SerializeType.values()) {
			if (serializeType.getSerializeType().equals(type)) {
				ret = serializeType;
				break;
			}
		}
		return ret;
	}
}
